# Contributor: Dermot Bradley <dermot_bradley@yahoo.com>
# Maintainer: Dermot Bradley <dermot_bradley@yahoo.com>
pkgname=jitterentropy-library
#
# NOTE: Please check with the maintainer *before* deciding to submit any
# MR to update the package - this package is (currently) only used by
# rng-tools and care needs to be taken that both are aligned (i.e. some
# necessary changes in *both* packages may not be released at the same
# time and potentially upgrading jitterentropy-library alone could break
# rng-tools' jitter functionality).
#
pkgver=3.4.1
pkgrel=0
pkgdesc="Jitterentropy library"
url="http://www.chronox.de/jent.html"
arch="all"
license="BSD-3-Clause OR GPL-2.0-only"
subpackages="$pkgname-dev $pkgname-doc"
options="!check" # There are no testcases
source="$pkgname-$pkgver.tar.gz::https://github.com/smuellerDD/jitterentropy-library/archive/v$pkgver.tar.gz
	01-disable-gcc-optimisation.patch
	02-fix-s390x-stack-corruption.patch
	03-fix-dangling-pointer.patch
	04-fix-memory-leak.patch
	"

build() {
	make
}

package() {
	make DESTDIR="$pkgdir" PREFIX=/usr install
}

sha512sums="
c832b33c084a8c56fb9ee0c0f7397fa9206cbd6fcbea047495e543566fc0d9b5d8978c8668103203d87b5b70c0e177f9ef7cc614b3ce689b90fbb8b85e6fedbb  jitterentropy-library-3.4.1.tar.gz
da19a711ca37081d05cefd46eff148dc6f44590b3b7375fbee9dd4bad453e2127256135d0f396ff614dc729fee2c80e0e567e19bb8829761cbd4a4c125341e4b  01-disable-gcc-optimisation.patch
737848e0f2b43b81b2caf8f9600c616d6ad79a1c3a9bbc2346ae9e23f7dddf20ddb265caeb6be0e0bd70cc6e7d2eaf36aa457d2b45c86d9e8e2efa37ba9013b7  02-fix-s390x-stack-corruption.patch
a3a4f0d66094c7d3139eef02437d17848fb5dcd338a84757f36eae71ba5c685cfe038d24cba990c2a940eccfcfdc6b3aaa780afa4ded33efe6f165d96df75c78  03-fix-dangling-pointer.patch
1edd24b3deb171850dc06e25a579ca15db69ac28bb867c9210c8a600b4370afb82aa12511daddbe994d58997282dc8d486e538c5e7ceb5296a5387c88c1f120a  04-fix-memory-leak.patch
"
